const nodata = require('../tw-lib-base/no-data/props')
const padding = require('../tw-lib-base/padding/props')
const border = require('../tw-lib-base/border/props')
module.exports = {
  list: {
    type: Object,
    default: function () {
      return [
        {
          label: '标签1',
          value: '标签内容1'
        },
        {
          label: '标签2',
          value: '标签内容2'
        }
      ]
    },
    name: '标签列表',
    filedType: 'api'
  },

  lineHeight: {
    type: String,
    default: '20px',
    name: '行高',
    filedType: 'string'
  },

  fontFamily: {
    type: Array,
    default: '微软雅黑',
    name: '字体',
    filedType: 'select',
    options: [
      {
        name: '微软雅黑',
        value: 'Microsoft YaHei'
      },
      {
        name: '宋体',
        value: '宋体'
      },
      {
        name: '继承父元素',
        value: 'inherit'
      },
      {
        name: 'Arial',
        value: 'Arial'
      },
      {
        name: 'Helvetica Neue',
        value: 'Helvetica Neue'
      },
      {
        name: 'Helvetica',
        value: 'Helvetica'
      }
    ]
  },

  fontSize: {
    type: String,
    default: '14px',
    name: '字号',
    filedType: 'string'
  },

  color: {
    type: String,
    default: '#333',
    name: '文本颜色',
    filedType: 'color'
  },

  labelWidth: {
    type: String,
    default: '',
    name: '标签名称宽度',
    filedType: 'string'
  },

  labelAlign: {
    type: Array,
    default: 'left',
    name: '标签对齐方式',
    filedType: 'select',
    options: [
      {
        name: '左对齐',
        value: 'left'
      },
      {
        name: '居中',
        value: 'center'
      },
      {
        name: '右对齐',
        value: 'right'
      }
    ]
  },

  labelColor: {
    type: String,
    default: '#333',
    name: '标签文本颜色',
    filedType: 'color'
  },

  labelFontSize: {
    type: String,
    default: '14px',
    name: '标签文本大小',
    filedType: 'string'
  },

  labelFontWeightIsBold: {
    type: Boolean,
    default: false,
    name: '标签粗体显示',
    filedType: 'switch'
  },

  labelPaddingRight: {
    type: String,
    default: '5px',
    name: '标签与内容的距离',
    filedType: 'string'
  },

  wrap: {
    type: Boolean,
    default: false,
    name: '多行显示',
    filedType: 'switch'
  },

  mulLine: {
    type: Boolean,
    default: false,
    name: '多列显示',
    filedType: 'switch'
  },
  lineNum: {
    type: String,
    default: '2',
    name: '列数',
    filedType: 'string',
    vif: {
      key: 'mulLine',
      value: true
    }
  },
  itemWidth: {
    type: String,
    default: '130px',
    name: '标签项宽度',
    filedType: 'string',
    vif: {
      key: 'mulLine',
      value: true
    }
  },
  padding: {
    type: String,
    default: '0 5px',
    name: '标签内边距',
    filedType: 'string',
    vif: {
      key: 'mulLine',
      value: true
    }
  },
  labelRadius: {
    type: String,
    default: '5px',
    name: '标签圆角',
    filedType: 'string',
    vif: {
      key: 'mulLine',
      value: true
    }
  },
  labelLeft: {
    type: String,
    default: '15px',
    name: '标签左右距离',
    filedType: 'string',
    vif: {
      key: 'mulLine',
      value: true
    }
  },
  labelTop: {
    type: String,
    default: '10px',
    name: '标签上下距离',
    filedType: 'string',
    vif: {
      key: 'mulLine',
      value: true
    }
  },
  hasBeforeDot: {
    type: Boolean,
    default: false,
    name: '显示序列点',
    filedType: 'switch'
  },

  dotType: {
    type: String,
    default: 'circle',
    name: '序列点样式',
    filedType: 'select',
    options: [
      {
        name: '圆点',
        value: 'circle'
      },
      {
        name: '正方形',
        value: 'square'
      }
    ],
    vif: {
      key: 'hasBeforeDot',
      value: true
    }
  },
  dotColor: {
    type: String,
    default: '#ccc',
    name: '序列点颜色',
    filedType: 'color',
    vif: {
      key: 'hasBeforeDot',
      value: true
    }
  },

  useClickfn: {
    type: Boolean,
    default: false,
    name: '启用点击事件',
    filedType: 'switch'
  },
  dotActColor: {
    type: String,
    default: 'red',
    name: '高亮序列点颜色',
    filedType: 'color',
    vif: {
      key: 'useClickfn',
      value: true
    }
  },
  actBgColor: {
    type: String,
    default: '#ccc',
    name: '高亮标签背景色',
    filedType: 'color',
    vif: {
      key: 'useClickfn',
      value: true
    }
  },
  value: {
    type: [String, Object],
    default: '',
    name: '选中标签名称',
    filedType: 'value',
    dataSource: {
      from: 'list',
      type: 'array',
      labelKey: 'label',
      valueKey: 'value'
    },
    vif: {
      key: 'useClickfn',
      value: true
    }
  },
  exScrollbar: {
    type: Boolean,
    default: false,
    name: '启用大屏滚动条样式',
    filedType: 'switch'
  },
  showMore: {
    type: Boolean,
    default: false,
    name: '显示更多',
    filedType: 'switch'
  },
  moreLink: {
    type: String,
    default: '',
    name: '更多链接',
    filedType: 'string',
    vif: {
      key: 'showMore',
      value: true
    }
  },
  moreColor: {
    type: String,
    default: 'red',
    name: '更多划过颜色',
    filedType: 'color',
    vif: {
      key: 'showMore',
      value: true
    }
  },
  valueObject: {
    type: Boolean,
    default: false,
    name: '启用对象格式值',
    filedType: 'switch'
  },

  ...padding,
  ...border,
  ...nodata
}

// Helvetica Neue,,宋体,Arial,Helvetica,sans-serif
